package com.ruoyi.zsyh.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zsyh.mapper.ZsyhPlatformSellpartsspecialMapper;
import com.ruoyi.zsyh.domain.ZsyhPlatformSellpartsspecial;
import com.ruoyi.zsyh.service.IZsyhPlatformSellpartsspecialService;
import com.ruoyi.common.core.text.Convert;

/**
 * 商城活动商品Service业务层处理
 * 
 * @author yuexl
 * @date 2025-04-27
 */
@Service
public class ZsyhPlatformSellpartsspecialServiceImpl implements IZsyhPlatformSellpartsspecialService 
{
    @Autowired
    private ZsyhPlatformSellpartsspecialMapper zsyhPlatformSellpartsspecialMapper;

    /**
     * 查询商城活动商品
     * 
     * @param id 商城活动商品ID
     * @return 商城活动商品
     */
    @Override
    public ZsyhPlatformSellpartsspecial selectZsyhPlatformSellpartsspecialById(String id)
    {
        return zsyhPlatformSellpartsspecialMapper.selectZsyhPlatformSellpartsspecialById(id);
    }

    /**
     * 查询商城活动商品列表
     * 
     * @param zsyhPlatformSellpartsspecial 商城活动商品
     * @return 商城活动商品
     */
    @Override
    public List<ZsyhPlatformSellpartsspecial> selectZsyhPlatformSellpartsspecialList(ZsyhPlatformSellpartsspecial zsyhPlatformSellpartsspecial)
    {
        return zsyhPlatformSellpartsspecialMapper.selectZsyhPlatformSellpartsspecialList(zsyhPlatformSellpartsspecial);
    }

    /**
     * 新增商城活动商品
     * 
     * @param zsyhPlatformSellpartsspecial 商城活动商品
     * @return 结果
     */
    @Override
    public int insertZsyhPlatformSellpartsspecial(ZsyhPlatformSellpartsspecial zsyhPlatformSellpartsspecial)
    {
        zsyhPlatformSellpartsspecial.setCreateTime(DateUtils.getNowDate());
        return zsyhPlatformSellpartsspecialMapper.insertZsyhPlatformSellpartsspecial(zsyhPlatformSellpartsspecial);
    }

    /**
     * 修改商城活动商品
     * 
     * @param zsyhPlatformSellpartsspecial 商城活动商品
     * @return 结果
     */
    @Override
    public int updateZsyhPlatformSellpartsspecial(ZsyhPlatformSellpartsspecial zsyhPlatformSellpartsspecial)
    {
        zsyhPlatformSellpartsspecial.setUpdateTime(DateUtils.getNowDate());
        return zsyhPlatformSellpartsspecialMapper.updateZsyhPlatformSellpartsspecial(zsyhPlatformSellpartsspecial);
    }

    /**
     * 删除商城活动商品对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteZsyhPlatformSellpartsspecialByIds(String ids)
    {
        return zsyhPlatformSellpartsspecialMapper.deleteZsyhPlatformSellpartsspecialByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除商城活动商品信息
     * 
     * @param id 商城活动商品ID
     * @return 结果
     */
    @Override
    public int deleteZsyhPlatformSellpartsspecialById(String id)
    {
        return zsyhPlatformSellpartsspecialMapper.deleteZsyhPlatformSellpartsspecialById(id);
    }
}
